#include <iostream>
using std::cout;
using std::endl;

int num = 100;

class Test
{
public:
    virtual void func() {
        cout << "Hello" << endl;
    }
};

void test0(){
    const char * pstr = "world";
    Test t1;
    long * p1 = (long*)(&t1);
    long * fp = (long*)(*p1);
    cout << &num << endl;
    //虚函数表中保存的函数指针的地址
    cout << fp << endl;
    printf("%p\n",pstr);
}

int main(void){
    test0();
    return 0;
}
